﻿namespace Vdc.Calendar2
{
    using System;
    using System.ComponentModel;
    using System.Web.UI;

    [ToolboxItem(false), CLSCompliant(true)]
    public class SpecialDate : Control
    {
        public SpecialDate()
        {
        }

        public SpecialDate(DateTime specialDate)
        {
            this.Year = specialDate.Year;
            this.Month = specialDate.Month;
            this.Day = specialDate.Day;
        }

        public SpecialDate(DateTime specialDate, string ToolTip)
        {
            this.Year = specialDate.Year;
            this.Month = specialDate.Month;
            this.Day = specialDate.Day;
            this.ToolTip = ToolTip;
        }

        public SpecialDate(DateTime specialDate, string ToolTip, string CSSClass)
        {
            this.Year = specialDate.Year;
            this.Month = specialDate.Month;
            this.Day = specialDate.Day;
            this.ToolTip = ToolTip;
            this.CSSClass = CSSClass;
        }

        public SpecialDate(int Year, int Month, int Day)
        {
            this.Year = Year;
            this.Month = Month;
            this.Day = Day;
        }

        public SpecialDate(DateTime specialDate, string ToolTip, string CSSClass, string Url)
        {
            this.Year = specialDate.Year;
            this.Month = specialDate.Month;
            this.Day = specialDate.Day;
            this.ToolTip = ToolTip;
            this.CSSClass = CSSClass;
            this.CSSClassOver = CSSClass;
            this.Url = Url;
        }

        public SpecialDate(int Year, int Month, int Day, string ToolTip)
        {
            this.Year = Year;
            this.Month = Month;
            this.Day = Day;
            this.ToolTip = ToolTip;
        }

        public SpecialDate(DateTime specialDate, string ToolTip, string CSSClass, string CSSClassOver, string Url)
        {
            this.Year = specialDate.Year;
            this.Month = specialDate.Month;
            this.Day = specialDate.Day;
            this.ToolTip = ToolTip;
            this.CSSClass = CSSClass;
            this.CSSClassOver = CSSClassOver;
            this.Url = Url;
        }

        public SpecialDate(int Year, int Month, int Day, string ToolTip, string CSSClass)
        {
            this.Year = Year;
            this.Month = Month;
            this.Day = Day;
            this.ToolTip = ToolTip;
            this.CSSClass = CSSClass;
        }

        public SpecialDate(int Year, int Month, int Day, string ToolTip, string CSSClass, string Url)
        {
            this.Year = Year;
            this.Month = Month;
            this.Day = Day;
            this.ToolTip = ToolTip;
            this.CSSClass = CSSClass;
            this.CSSClassOver = CSSClass;
            this.Url = Url;
        }

        public SpecialDate(int Year, int Month, int Day, string ToolTip, string CSSClass, string CSSClassOver, string Url)
        {
            this.Year = Year;
            this.Month = Month;
            this.Day = Day;
            this.ToolTip = ToolTip;
            this.CSSClass = CSSClass;
            this.CSSClassOver = CSSClassOver;
            this.Url = Url;
        }

        public override bool Equals(object obj)
        {
            return (((this.Year == ((SpecialDate) obj).Year) && (this.Month == ((SpecialDate) obj).Month)) && (this.Day == ((SpecialDate) obj).Day));
        }

        [Bindable(true), Description("CSS class name to apply to this special date."), Category("Appearance"), DefaultValue("")]
        public string CSSClass
        {
            get
            {
                string str = (string) this.ViewState["CSSClass"];
                return ((str == null) ? string.Empty : str);
            }
            set
            {
                this.ViewState["CSSClass"] = value;
            }
        }

        [Description("CSS class name to apply to this special date when the mouse is over."), Bindable(true), DefaultValue(""), Category("Appearance")]
        public string CSSClassOver
        {
            get
            {
                string str = (string) this.ViewState["CSSClassOver"];
                return ((str == null) ? string.Empty : str);
            }
            set
            {
                this.ViewState["CSSClassOver"] = value;
            }
        }

        [Category("Settings"), Description("Special date day."), DefaultValue(""), Bindable(true)]
        public int Day
        {
            get
            {
                object obj2 = this.ViewState["Day"];
                return ((obj2 == null) ? DateTime.Today.Day : ((int) obj2));
            }
            set
            {
                this.ViewState["Day"] = value;
            }
        }

        [Description("Special date month."), DefaultValue(""), Bindable(true), Category("Settings")]
        public int Month
        {
            get
            {
                object obj2 = this.ViewState["Month"];
                return ((obj2 == null) ? DateTime.Today.Month : ((int) obj2));
            }
            set
            {
                this.ViewState["Month"] = value;
            }
        }

        [Category("Settings"), Bindable(true), Description("Special date tooltip."), DefaultValue("")]
        public string ToolTip
        {
            get
            {
                string str = (string) this.ViewState["ToolTip"];
                return ((str == null) ? string.Empty : str);
            }
            set
            {
                this.ViewState["ToolTip"] = value;
            }
        }

        [DefaultValue(""), Category("Settings"), Description("Special date URL."), Bindable(true)]
        public string Url
        {
            get
            {
                string str = (string) this.ViewState["Url"];
                return ((str == null) ? string.Empty : str);
            }
            set
            {
                this.ViewState["Url"] = value;
            }
        }

        [Category("Settings"), Description("Special date year."), Bindable(true), DefaultValue("")]
        public int Year
        {
            get
            {
                object obj2 = this.ViewState["Year"];
                return ((obj2 == null) ? DateTime.Today.Year : ((int) obj2));
            }
            set
            {
                this.ViewState["Year"] = value;
            }
        }
    }
}

